package grobit.http

import org.apache.http.HttpEntity
import org.apache.http.HttpResponse
import org.apache.http.client.HttpClient
import org.apache.http.client.methods.HttpGet
import org.apache.http.impl.client.DefaultHttpClient
import org.apache.http.util.EntityUtils

class HttpEngine {

    String process(String url) {
        HttpGet httpGet = new HttpGet(url)
        HttpClient httpClient = new DefaultHttpClient()
        HttpResponse httpResponse = httpClient.execute(httpGet)
        HttpEntity httpEntity = httpResponse.getEntity()
        return EntityUtils.toString(httpEntity)
    }
}
